<template>
  <XForm ref="XForm" dataKey="findFormData" :formList="findFormList" :formData="findFormData" size="medium" label-position="top">
    <template v-slot:btn>
      <el-button type="primary" @click="$message(JSON.stringify(findFormData))">搜索</el-button>
    </template>
  </XForm>
</template>

<script>
import { XForm } from '@/components/@fhsy/x-tool'
export default {
  components: { XForm },
  data: () => ({
    findFormList: [
      { label: '标题', prop: 'name', span: 6 },
      { label: '状态', prop: 'status', type: 'XSelect', options: [{ label: '全部', value: -1 }, { label: '不可用', value: 0 }, { label: '可用', value: 1 }], span: 6 },
      { label: '仓库', prop: 'warehouse', type: 'XCheckbox', options: [{ label: '码云', value: 0 }, { label: 'GitHub', value: 1, disabled: true }, { label: 'GitLab', value: 2 }], span: 6 },
      { slot: 'btn', span: 6 }
    ],
    findFormData: { // 控件默认值
      status: -1,
      warehouse: [0]
    }
  })
}
</script>
